﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;

namespace T.FAS.Runtime.Base.Entity
{
    /// <summary>
    /// 数据返回结构
    /// </summary>
    public class TSchema
    {
        /// <summary>
        /// Action ID
        /// </summary>
        public string ActionID { get; set; }
        /// <summary>
        /// Action Code
        /// </summary>
        public string ActionCode { get; set; }
        /// <summary>
        /// Action Name
        /// </summary>
        public string ActionName { get; set; }
        /// <summary>
        /// 数据来源类型 例如DQ、CDO、DO、EO等
        /// </summary>
        public TEntityType MetadataType { get; set; }
        /// <summary>
        /// 数据返回类型  例如List\Record
        /// </summary>
        public DataType ResultType { get; set; }
        /// <summary>
        /// 转为Json
        /// </summary>
        /// <returns></returns>
        public string ToJson()
        {
            return JsonConvert.SerializeObject(this);
        }
        /// <summary>
        /// 数据结构
        /// </summary>
        public TEntity Entity { get; set; }

    }
}
